<template>
  <a class="showItem" href="jacescript:;">
    <img :src="img" />
    <div class="showTitle">
      <p class="title">{{ title }}</p>
      <div class="location">
        <img src="@/assets/地址.svg" />
        <p>{{ location }}</p>
      </div>
    </div>
    <div class="footer">
      <p class="price">
        <span>{{ price }}</span>元/平米
      </p>
      <p class="detail">{{ detail }}</p>
    </div>
  </a>
</template>

<script>
import { defineComponent } from 'vue'
export default defineComponent({
  props: {
    img: {
      typeof: String,
      default: ''
    },
    title: {
      typeof: String,
      default: '金泽豪庭'
    },
    location: {
      typeof: String,
      default: '增城·白江'
    },
    price: {
      typeof: Number,
      default: 16500
    },
    detail: {
      typeof: String,
      default: '三房两厅·90.2平米'
    }
  }
})
</script>

<style lang='less' scoped>
.showItem {
  box-sizing: border-box;
  width: calc((1180px - 30px) / 4);
  height: 265px;
  margin-right: 10px;
  background-color: #fff;
  border: 1px solid #ededed;
  img {
    width: 100%;
    height: 190px;
    background-color: red;
  }
  .title {
    margin-left: 8px;
  }
  .showTitle {
    display: flex;
    align-items: center;
    margin-top: 11px;
    .location {
      position: relative;
      display: flex;
      align-items: center;
      background-color: #3072f6;
      width: 124px;
      height: 28px;
      margin-left: 76px;
      border-radius: 4px;
      img {
        margin-left: 11px;
        width: 15px;
        height: 16px;
        background-color: transparent;
      }
      p {
        position: absolute;
        right: 8px;
        font-family: 'HarmonyOS Sans SC';
        font-style: normal;
        font-weight: 400;
        font-size: 16px;
        color: #ffffff;
      }
    }
  }
  .footer {
    display: flex;
    .price {
      font-family: 'HarmonyOS Sans SC';
      font-style: normal;
      font-weight: 500;
      font-size: 14px;
      color: #333333;
      span {
        margin-left: 8px;
        margin-right: 4px;
        font-family: 'HarmonyOS Sans SC';
        font-style: normal;
        font-weight: 700;
        font-size: 20px;
        color: #f15044;
      }
    }
    .detail {
      font-family: 'HarmonyOS Sans SC';
      font-style: normal;
      font-weight: 400;
      font-size: 14px;
      color: #9399a5;
      margin-top: 8px;
      margin-left: 33px;
    }
  }
}
</style>
